package FlyGame;

import javax.swing.*;
import java.awt.*;

public class BackDown {
    private int bkx;
    private int bky;
    private int bkcount;

    public int getBkx() {
        return bkx;
    }

    public void setBkx(int bkx) {
        this.bkx = bkx;
    }

    public int getBky() {
        return bky;
    }

    public void setBky(int bky) {
        this.bky = bky;
    }

    public int getBkcount() {
        return bkcount;
    }

    public void setBkcount(int bkcount) {
        this.bkcount = bkcount;
    }

    public BackDown() {
        this.bkx = FlyPicture.Flyback.getIconWidth();
        this.bky = FlyPicture.Flyback.getIconHeight();
        this.bkcount = 600 / bkx + 1;
    }

    public void paintBackDown(Graphics g, JPanel panel) {
        for (int i = 0; i < this.bkcount; i++) {
            FlyPicture.Flyback.paintIcon(panel, g, i * this.bkx, 500 - this.bky);
        }
    }
}
